<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: power_clocks_lib.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">power_clocks_lib.h</div>  </div>
</div>
<div class="contents">
<a href="power__clocks__lib_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*This file has been prepared for Doxygen automatic documentation generation.*/</span>
<a name="l00018"></a>00018 <span class="comment">/* Copyright (c) 2009 Atmel Corporation. All rights reserved.</span>
<a name="l00019"></a>00019 <span class="comment"> *</span>
<a name="l00020"></a>00020 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00021"></a>00021 <span class="comment"> * modification, are permitted provided that the following conditions are met:</span>
<a name="l00022"></a>00022 <span class="comment"> *</span>
<a name="l00023"></a>00023 <span class="comment"> * 1. Redistributions of source code must retain the above copyright notice, this</span>
<a name="l00024"></a>00024 <span class="comment"> * list of conditions and the following disclaimer.</span>
<a name="l00025"></a>00025 <span class="comment"> *</span>
<a name="l00026"></a>00026 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright notice,</span>
<a name="l00027"></a>00027 <span class="comment"> * this list of conditions and the following disclaimer in the documentation</span>
<a name="l00028"></a>00028 <span class="comment"> * and/or other materials provided with the distribution.</span>
<a name="l00029"></a>00029 <span class="comment"> *</span>
<a name="l00030"></a>00030 <span class="comment"> * 3. The name of Atmel may not be used to endorse or promote products derived</span>
<a name="l00031"></a>00031 <span class="comment"> * from this software without specific prior written permission.</span>
<a name="l00032"></a>00032 <span class="comment"> *</span>
<a name="l00033"></a>00033 <span class="comment"> * 4. This software may only be redistributed and used in connection with an Atmel</span>
<a name="l00034"></a>00034 <span class="comment"> * AVR product.</span>
<a name="l00035"></a>00035 <span class="comment"> *</span>
<a name="l00036"></a>00036 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY ATMEL &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED</span>
<a name="l00037"></a>00037 <span class="comment"> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF</span>
<a name="l00038"></a>00038 <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE</span>
<a name="l00039"></a>00039 <span class="comment"> * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR</span>
<a name="l00040"></a>00040 <span class="comment"> * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span>
<a name="l00041"></a>00041 <span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span>
<a name="l00042"></a>00042 <span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span>
<a name="l00043"></a>00043 <span class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00044"></a>00044 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span>
<a name="l00045"></a>00045 <span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE</span>
<a name="l00046"></a>00046 <span class="comment"> *</span>
<a name="l00047"></a>00047 <span class="comment"> */</span>
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 <span class="preprocessor">#ifndef _POWER_CLOCKS_LIB_H_</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define _POWER_CLOCKS_LIB_H_</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span>
<a name="l00052"></a>00052 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00054"></a>00054 <span class="preprocessor">#endif</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a>00056 <span class="preprocessor">#include &lt;avr32/io.h&gt;</span>
<a name="l00057"></a>00057 <span class="preprocessor">#include &quot;<a class="code" href="compiler_8h.html" title="Compiler file for AVR32.">compiler.h</a>&quot;</span>
<a name="l00058"></a>00058 
<a name="l00059"></a>00059 <span class="preprocessor">#ifndef AVR32_PM_VERSION_RESETVALUE</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="comment">// Support for UC3A, UC3A3, UC3B parts.</span>
<a name="l00061"></a>00061 <span class="preprocessor">  #include &quot;pm.h&quot;</span>
<a name="l00062"></a>00062 <span class="preprocessor">#else</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00064"></a>00064 <span class="preprocessor">#if UC3L </span>
<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">  #include &quot;pm_uc3l.h&quot;</span>
<a name="l00066"></a>00066 <span class="preprocessor">  #include &quot;scif_uc3l.h&quot;</span>
<a name="l00067"></a>00067 <span class="preprocessor">  #include &quot;flashcdw.h&quot;</span>
<a name="l00068"></a>00068 <span class="preprocessor">#elif UC3C</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">  #include &quot;<a class="code" href="pm__uc3c_8h.html" title="Power Manager(PM) driver interface.">pm_uc3c.h</a>&quot;</span>
<a name="l00070"></a>00070 <span class="preprocessor">  #include &quot;<a class="code" href="scif__uc3c_8h.html" title="System Control InterFace(SCIF) driver interface.">scif_uc3c.h</a>&quot;</span>
<a name="l00071"></a>00071 <span class="preprocessor">  #include &quot;<a class="code" href="flashc_8h.html" title="FLASHC driver for AVR32 UC3.">flashc.h</a>&quot;</span>
<a name="l00072"></a>00072 <span class="preprocessor">#elif UC3D</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">  #include &quot;pm_uc3d.h&quot;</span>
<a name="l00074"></a>00074 <span class="preprocessor">  #include &quot;scif_uc3d.h&quot;</span>
<a name="l00075"></a>00075 <span class="preprocessor">  #include &quot;flashcdw.h&quot;</span>
<a name="l00076"></a>00076 <span class="preprocessor">#endif</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">  #endif</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span>
<a name="l00081"></a>00081 
<a name="l00082"></a>00082 
<a name="l00084"></a><a class="code" href="power__clocks__lib_8h.html#af1e177f049f666a68c4969ab118bac6b">00084</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00085"></a>00085 {
<a name="l00086"></a><a class="code" href="power__clocks__lib_8h.html#af1e177f049f666a68c4969ab118bac6ba1de109897efb1a7aa0945ff267cb7a5c">00086</a>   <a class="code" href="power__clocks__lib_8h.html#af1e177f049f666a68c4969ab118bac6ba1de109897efb1a7aa0945ff267cb7a5c">PCL_OSC0</a>  = 0,
<a name="l00087"></a><a class="code" href="power__clocks__lib_8h.html#af1e177f049f666a68c4969ab118bac6ba4c5069c1dc660a89db3752fdff54b8ae">00087</a>   <a class="code" href="power__clocks__lib_8h.html#af1e177f049f666a68c4969ab118bac6ba4c5069c1dc660a89db3752fdff54b8ae">PCL_OSC1</a>  = 1
<a name="l00088"></a>00088 } <a class="code" href="power__clocks__lib_8h.html#af1e177f049f666a68c4969ab118bac6b" title="The different oscillators.">pcl_osc_t</a>;
<a name="l00089"></a>00089 
<a name="l00091"></a><a class="code" href="power__clocks__lib_8h.html#af9cae9b1b110d1b3d27c23593a757074">00091</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00092"></a>00092 {
<a name="l00093"></a><a class="code" href="power__clocks__lib_8h.html#af9cae9b1b110d1b3d27c23593a757074a50aa495ad526c0d2daf92cad1b3d5d7b">00093</a>   <a class="code" href="power__clocks__lib_8h.html#af9cae9b1b110d1b3d27c23593a757074a50aa495ad526c0d2daf92cad1b3d5d7b">PCL_DFLL0</a>  = 0,
<a name="l00094"></a><a class="code" href="power__clocks__lib_8h.html#af9cae9b1b110d1b3d27c23593a757074a8325a65259a575f4ae34f1a796b5cd99">00094</a>   <a class="code" href="power__clocks__lib_8h.html#af9cae9b1b110d1b3d27c23593a757074a8325a65259a575f4ae34f1a796b5cd99">PCL_DFLL1</a>  = 1
<a name="l00095"></a>00095 } <a class="code" href="power__clocks__lib_8h.html#af9cae9b1b110d1b3d27c23593a757074" title="The different DFLLs.">pcl_dfll_t</a>;
<a name="l00096"></a>00096 
<a name="l00098"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011b">00098</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00099"></a>00099 {
<a name="l00100"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011baa2c1cfc43f78e8d6f4fd6b320b2166e4">00100</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011baa2c1cfc43f78e8d6f4fd6b320b2166e4">PCL_MC_RCSYS</a>,      <span class="comment">// Default main clock source, supported by all (aka Slow Clock)</span>
<a name="l00101"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba167075b7136f979cd69680823ab75588">00101</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba167075b7136f979cd69680823ab75588">PCL_MC_OSC0</a>,       <span class="comment">// Supported by all</span>
<a name="l00102"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba72088d029d0fe1971673ad00462dff9a">00102</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba72088d029d0fe1971673ad00462dff9a">PCL_MC_OSC1</a>,       <span class="comment">// Supported by UC3C only</span>
<a name="l00103"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba1823c6c5e3ae6bf50d4b3f01184c2584">00103</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba1823c6c5e3ae6bf50d4b3f01184c2584">PCL_MC_OSC0_PLL0</a>,  <span class="comment">// Supported by UC3A, UC3B, UC3A3, UC3C (the main clock source is PLL0 with OSC0 as reference)</span>
<a name="l00104"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011bae6334cb514de83b881d9b3c9c7c51a14">00104</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011bae6334cb514de83b881d9b3c9c7c51a14">PCL_MC_OSC1_PLL0</a>,  <span class="comment">// Supported by UC3A, UC3B, UC3A3, UC3C (the main clock source is PLL0 with OSC1 as reference)</span>
<a name="l00105"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba1830fbd30b05dd549301185c02ed642b">00105</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba1830fbd30b05dd549301185c02ed642b">PCL_MC_OSC0_PLL1</a>,  <span class="comment">// Supported by UC3C  (the main clock source is PLL1 with OSC0 as reference)</span>
<a name="l00106"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011baff81d68a3173246658eaa6562ab7537e">00106</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011baff81d68a3173246658eaa6562ab7537e">PCL_MC_OSC1_PLL1</a>,  <span class="comment">// Supported by UC3C  (the main clock source is PLL1 with OSC1 as reference)</span>
<a name="l00107"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba00c460fd0a7c48c4c4e2b8885d2add6c">00107</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba00c460fd0a7c48c4c4e2b8885d2add6c">PCL_MC_DFLL0</a>,      <span class="comment">// Supported by UC3L</span>
<a name="l00108"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba5693f6f428fbbb249094fb998b80d056">00108</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba5693f6f428fbbb249094fb998b80d056">PCL_MC_DFLL1</a>,      <span class="comment">// Not supported yet</span>
<a name="l00109"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011bad0a4e4975a1dba0e60a656863836641b">00109</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011bad0a4e4975a1dba0e60a656863836641b">PCL_MC_RC120M</a>,     <span class="comment">// Supported by UC3L, UC3C</span>
<a name="l00110"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba3aa38440bf297cb450e3964a7124ba5a">00110</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba3aa38440bf297cb450e3964a7124ba5a">PCL_MC_RC8M</a>,       <span class="comment">// Supported by UC3C</span>
<a name="l00111"></a><a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba6c9a242dc5a97294c077bfba858055f8">00111</a>   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011ba6c9a242dc5a97294c077bfba858055f8">PCL_MC_CRIPOSC</a>     <span class="comment">// Supported by UC3C</span>
<a name="l00112"></a>00112 } <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011b" title="Possible Main Clock Sources.">pcl_mainclk_t</a>;
<a name="l00113"></a>00113 
<a name="l00115"></a>00115 <span class="comment">// NOTE: regarding the frequency settings, always abide by the datasheet rules and min &amp; max supported frequencies.</span>
<a name="l00116"></a>00116 <span class="preprocessor">#ifndef AVR32_PM_VERSION_RESETVALUE</span>
<a name="l00117"></a>00117 <span class="preprocessor"></span><span class="comment">// Support for UC3A, UC3A3, UC3B parts.</span>
<a name="l00118"></a><a class="code" href="power__clocks__lib_8h.html#ae5d58ccb6ba7a33fc31a4d746be5c1f8">00118</a> <span class="preprocessor">#define pcl_freq_param_t  pm_freq_param_t // See pm.h</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span><span class="comment">// Support for UC3C, UC3L parts.</span>
<a name="l00121"></a>00121 <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00122"></a>00122 {
<a name="l00124"></a>00124   <a class="code" href="power__clocks__lib_8h.html#a262b8e2623fe509dd4eb8d46bfe6011b" title="Possible Main Clock Sources.">pcl_mainclk_t</a> main_clk_src;
<a name="l00125"></a>00125 
<a name="l00127"></a>00127   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> cpu_f;
<a name="l00128"></a>00128 
<a name="l00130"></a>00130   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> pba_f;
<a name="l00131"></a>00131 
<a name="l00133"></a>00133   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> pbb_f;
<a name="l00134"></a>00134 
<a name="l00136"></a>00136   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> pbc_f;
<a name="l00137"></a>00137 
<a name="l00139"></a>00139   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> osc0_f;
<a name="l00140"></a>00140 
<a name="l00142"></a>00142   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> osc0_startup;
<a name="l00143"></a>00143 
<a name="l00145"></a>00145   <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> dfll_f;
<a name="l00146"></a>00146   
<a name="l00148"></a>00148   <span class="comment">// For the UC3L DFLL setup, this parameter should be pointing to a structure of</span>
<a name="l00149"></a>00149   <span class="comment">// type (scif_gclk_opt_t *).</span>
<a name="l00150"></a>00150   <span class="keywordtype">void</span> *pextra_params;
<a name="l00151"></a>00151 } <a class="code" href="power__clocks__lib_8h.html#ae5d58ccb6ba7a33fc31a4d746be5c1f8" title="Input and output parameters to configure clocks with pcl_configure_clocks().">pcl_freq_param_t</a>;
<a name="l00152"></a>00152 <span class="preprocessor">#endif</span>
<a name="l00153"></a>00153 <span class="preprocessor"></span>
<a name="l00155"></a><a class="code" href="power__clocks__lib_8h.html#a59e0f4c56cd3a4bbe8048c5f25f29d0a">00155</a> <span class="preprocessor">#define PCL_NOT_SUPPORTED (-10000)</span>
<a name="l00156"></a>00156 <span class="preprocessor"></span>
<a name="l00179"></a>00179 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="power__clocks__lib_8c.html#a6a10f502b3248fff54863a281af1da9e" title="Device-specific data.">pcl_configure_clocks</a>(<a class="code" href="power__clocks__lib_8h.html#ae5d58ccb6ba7a33fc31a4d746be5c1f8" title="Input and output parameters to configure clocks with pcl_configure_clocks().">pcl_freq_param_t</a> *param);
<a name="l00180"></a>00180 
<a name="l00205"></a>00205 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="power__clocks__lib_8h.html#a37e123796912716a80c10045f483e618" title="Automatically configure the CPU, PBA, PBB, and HSB clocks using the RCSYS osc as main source clock...">pcl_configure_clocks_rcsys</a>(<a class="code" href="power__clocks__lib_8h.html#ae5d58ccb6ba7a33fc31a4d746be5c1f8" title="Input and output parameters to configure clocks with pcl_configure_clocks().">pcl_freq_param_t</a> *param);
<a name="l00206"></a>00206 
<a name="l00231"></a>00231 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="power__clocks__lib_8h.html#a73982b53f03832280909af1b437220ba" title="Automatically configure the CPU, PBA, PBB, and HSB clocks using the RC120M osc as main source clock...">pcl_configure_clocks_rc120m</a>(<a class="code" href="power__clocks__lib_8h.html#ae5d58ccb6ba7a33fc31a4d746be5c1f8" title="Input and output parameters to configure clocks with pcl_configure_clocks().">pcl_freq_param_t</a> *param);
<a name="l00232"></a>00232 
<a name="l00260"></a>00260 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="power__clocks__lib_8h.html#a4ff3149ebc8bf3064e77dc4b158aafad" title="Automatically configure the CPU, PBA, PBB, and HSB clocks using the OSC0 osc as main source clock...">pcl_configure_clocks_osc0</a>(<a class="code" href="power__clocks__lib_8h.html#ae5d58ccb6ba7a33fc31a4d746be5c1f8" title="Input and output parameters to configure clocks with pcl_configure_clocks().">pcl_freq_param_t</a> *param);
<a name="l00261"></a>00261 
<a name="l00293"></a>00293 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="power__clocks__lib_8h.html#a8528af6e455a48f6d7b134bbd51d5840" title="Automatically configure the CPU, PBA, PBB, and HSB clocks using the DFLL0 as main source clock...">pcl_configure_clocks_dfll0</a>(<a class="code" href="power__clocks__lib_8h.html#ae5d58ccb6ba7a33fc31a4d746be5c1f8" title="Input and output parameters to configure clocks with pcl_configure_clocks().">pcl_freq_param_t</a> *param);
<a name="l00294"></a>00294 
<a name="l00305"></a>00305 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="power__clocks__lib_8c.html#ac557cb29483bdd41f36dea2dba5bf9ab" title="Device-specific implementation.">pcl_switch_to_osc</a>(<a class="code" href="power__clocks__lib_8h.html#af1e177f049f666a68c4969ab118bac6b" title="The different oscillators.">pcl_osc_t</a> osc, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fcrystal, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> startup);
<a name="l00306"></a>00306 
<a name="l00318"></a>00318 <span class="preprocessor">#ifndef AVR32_PM_VERSION_RESETVALUE</span>
<a name="l00319"></a>00319 <span class="preprocessor"></span><span class="comment">// Implementation for UC3A, UC3A3, UC3B parts.</span>
<a name="l00320"></a><a class="code" href="power__clocks__lib_8h.html#a74e5a86210c3b80bd700df9389e215c8">00320</a> <span class="preprocessor">#define pcl_enable_module(module) pm_enable_module(&amp;AVR32_PM, module)</span>
<a name="l00321"></a>00321 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00322"></a>00322 <span class="preprocessor"></span><span class="comment">// Implementation for UC3C, UC3L parts.</span>
<a name="l00323"></a>00323 <span class="preprocessor">#define pcl_enable_module(module) pm_enable_module(module)</span>
<a name="l00324"></a>00324 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00325"></a>00325 <span class="preprocessor"></span>
<a name="l00337"></a>00337 <span class="preprocessor">#ifndef AVR32_PM_VERSION_RESETVALUE</span>
<a name="l00338"></a>00338 <span class="preprocessor"></span><span class="comment">// Implementation for UC3A, UC3A3, UC3B parts.</span>
<a name="l00339"></a><a class="code" href="power__clocks__lib_8h.html#a06bdd6244939aa44609ceca5bc036570">00339</a> <span class="preprocessor">#define pcl_disable_module(module)  pm_disable_module(&amp;AVR32_PM, module)</span>
<a name="l00340"></a>00340 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00341"></a>00341 <span class="preprocessor"></span><span class="comment">// Implementation for UC3C, UC3L parts.</span>
<a name="l00342"></a>00342 <span class="preprocessor">#define pcl_disable_module(module)  pm_disable_module(module)</span>
<a name="l00343"></a>00343 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00344"></a>00344 <span class="preprocessor"></span>
<a name="l00352"></a>00352 <span class="keyword">extern</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="power__clocks__lib_8c.html#a8c02993a038be7348f0363675e6e836a" title="Configure the USB Clock.">pcl_configure_usb_clock</a>(<span class="keywordtype">void</span>);
<a name="l00353"></a>00353 
<a name="l00355"></a>00355 
<a name="l00358"></a>00358 
<a name="l00359"></a>00359 
<a name="l00365"></a>00365 <span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="power__clocks__lib_8c.html#a1f0120dade42a19b5d5a0f2f217b857a" title="Read the content of the GPLP registers.">pcl_read_gplp</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> gplp);
<a name="l00366"></a>00366 
<a name="l00367"></a>00367 
<a name="l00373"></a>00373 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="power__clocks__lib_8c.html#a22234c65b535937b477c7e988ec2fec5" title="Write into the GPLP registers.">pcl_write_gplp</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> gplp, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> value);
<a name="l00374"></a>00374 
<a name="l00376"></a>00376 
<a name="l00377"></a>00377 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00378"></a>00378 <span class="preprocessor"></span>}
<a name="l00379"></a>00379 <span class="preprocessor">#endif</span>
<a name="l00380"></a>00380 <span class="preprocessor"></span>
<a name="l00381"></a>00381 <span class="preprocessor">#endif  // _POWER_CLOCKS_LIB_H_</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 19 2011 21:04:51 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
